package com.zlc.workflow.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum UserTypeEnum {

    START("START","流程启动"),
    VARIABLE("VARIABLE","流程变量"),
    ACCOUNT("ACCOUNT","账号"),
    NODE_APPROVE("NODE_APPROVE","节点审批人"),
    ALL_APPROVE("ALL_APPROVE","所有审批人"),
    ;

    private String type;
    private String desc;

    public static UserTypeEnum  getType(String type){
        UserTypeEnum[] types = values();
        for(UserTypeEnum nodeType : types){
            if(nodeType.type.equals(type)){
                return nodeType;
            }
        }
        return null;
    }
}
